package com.team.service.impl;

import com.team.entity.Competition;
import com.team.mapper.CompetitionMapper;
import com.team.service.CompetitionService;
import com.team.vo.CompetitionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompetitionServiceImpl implements CompetitionService {
    @Autowired
    private CompetitionMapper competitionMapper;
    @Override
    public List<Competition> getAllCompetition() {
        List<Competition> competitions = competitionMapper.getAllCompetitions();
        return competitions;
    }

    @Override
    public Competition getCompetitionDetails(String cid) {
        return competitionMapper.getCompetitionDetails(cid);
    }

    @Override
    public List<CompetitionVo> getCompetitionsByStudentId(int studentId) {
        return competitionMapper.getCompetitionsByStudentId(studentId);
    }
}
